package cn.edu.hstc.wm.ui;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;
import cn.edu.hstc.wm.R;

public class MyComment extends FragmentActivity {

	private ImageButton mBackButton;
	private TextView mTitleView;

	private Fragment mFragment;

	public void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		setContentView(R.layout.my_comment);
		
		
		initActionbar();
		initContent();
	}

	private void initActionbar() {
		mBackButton = (ImageButton) findViewById(R.id.ib_actionbar_back);
		mTitleView = (TextView) findViewById(R.id.tv_actionbar_title);

		mTitleView.setText("我的评论");
		mBackButton.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				finish();
			}
		});
	}

	private void initContent() {
		mFragment = new cn.edu.hstc.wm.ui.fragment.MyComment();
		FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
		transaction.add(R.id.fl_my_comment_content, mFragment);
		transaction.commitAllowingStateLoss();
	}

}
